package com.rxh.service.impl.core;

import com.rxh.mapper.core.CoreMerchantOrderMapper;
import com.rxh.pojo.Result;
import com.rxh.pojo.core.CoreMerchantOrder;
import com.rxh.service.base.AbstractBaseService;
import com.rxh.service.core.CoreMerchantOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CoreMerchantOrderServiceImpl extends AbstractBaseService<CoreMerchantOrder, Long> implements CoreMerchantOrderService {
    private final CoreMerchantOrderMapper coreMerchantOrderMapper;

    @Autowired
    public CoreMerchantOrderServiceImpl(CoreMerchantOrderMapper coreMerchantOrderMapper) {
        this.coreMerchantOrderMapper = coreMerchantOrderMapper;
        setMapper(coreMerchantOrderMapper);
    }

    @Override
    public Result<CoreMerchantOrder> selectByOrderId(Long orderId) {
        return new Result<>(Result.SUCCESS, coreMerchantOrderMapper.selectByOrderId(orderId));
    }
}